<extend name="Public:list_layout" />
<block name="subheader">
    <script src="__PUBLIC__/js/admin/jquery.artDialog.source.js?skin=default"></script>
    <script src="__PUBLIC__/js/admin/plugins/iframeTools.source.js"></script>
</block>
<block name="main">
    <form name="myform" action="__CONTROLLER__/listorder" method="post">
        <div class="table-list">
            <table width="100%" cellspacing="0">
                <thead>
                    <tr>
                        <th width="16"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"></th>
                        <th width="37">排序</th>
                        <th width="40">ID</th>
                        <?php foreach ($list_fields as $key => $field) { ?>
                        <th><?php echo $field['name']; ?></th>
                        <?php } ?>
                        <th width="118">更新时间</th>
                        <th>管理操作</th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach ($contents as $key => $content) { ?>
                    <tr>
                        <td align="center"><input class="inputcheckbox " name="ids[]" value="<?php echo $content['id']; ?>" type="checkbox"></td>
                        <td align="center"><input name="listorders[<?php echo $content['id']; ?>]" type="text" size="3" value="<?php echo $content['listorder']; ?>" class="input-text-c input-text"></td>
                        <td align="center"><?php echo $content['id']; ?></td>
                        <?php foreach ($list_fields as $key => $field) { ?>
                        <td><?php echo $content[$field['field']]; ?></td>
                        <?php } ?>
                        <td align="center"><?php echo $content['updatetime']; ?></td>
                        <td align="center">
                            <a href="__CONTROLLER__/category?id=<?php echo $content['id']; ?>">栏目管理</a> | <a href="javascript:omnipotent('relative_model', '__CONTROLLER__/relative?id=<?php echo $content['id']; ?>');void(0);">模型关联</a> | <a href="__CONTROLLER__/edit?id=<?php echo $content['id']; ?>">修改</a> | <a href="__CONTROLLER__/delete?id=<?php echo $content['id']; ?>" onClick="return confirm('确认删除『 <?php echo $content['title']; ?> 』 吗？')">删除</a>
                        </td>
                    </tr>
                    <?php } ?>
                </tbody>
            </table>
            <div class="btn"><label for="check_box">全选/取消</label>
                <input name="submit" type="submit" class="button" value="排序">&nbsp;
                <input name="deletesubmit" type="submit" class="button" value="删除" onclick="document.myform.action='<?php echo U('Content/delete'). "?catid=" .$catid; ?>';return confirm('确认要删除 『 选中 』 吗？')">
            </div>
            <?php if (isset($pages)) { ?>
            <div id="pages">
                <?php echo $pages; ?>
            </div>
            <?php } ?>
        </div>
    </form>
</block>